/*
 * $Id: JSPHelper.java 3 2011-12-28 18:47:08Z rook.alex@gmail.com $
 */
package ua.org.energy.vkek.site.web;

import java.io.IOException;
import javax.servlet.jsp.JspWriter;

public class JSPHelper {

    public static void printForm(JspWriter out, String formname, String[][] inputs) throws IOException {

        out.println("<form name=\"" + formname + "\" method=\"get\"");
        out.println("<h3>" + formname + "</h3>");
        for (int i = 0; i < inputs.length; i++) {
            out.println("<p>");
            out.println(inputs[i][0]);
            out.println("<input name=\"" + inputs[i][1] + "\"/>");
            out.println("</p>");
        }
        out.println("<input type=\"submit\"/>");
        out.println("</form>");

    }
}
